//package com.wwl.deliveryappointmentbackend.utils;
//
//import org.apache.http.HttpEntity;
//import org.apache.http.HttpResponse;
//import org.apache.http.NameValuePair;
//import org.apache.http.client.HttpClient;
//import org.apache.http.client.entity.UrlEncodedFormEntity;
//import org.apache.http.client.methods.HttpGet;
//import org.apache.http.client.methods.HttpPost;
//import org.apache.http.impl.client.HttpClients;
//import org.apache.http.message.BasicNameValuePair;
//import org.apache.http.util.EntityUtils;
//
//
//public class HttpClientUtils {
//
//    private static final HttpClient httpClient = HttpClients.createDefault();
//
//    public static String sendGetRequest(String url) throws IOException {
//        HttpGet httpGet = new HttpGet(url);
//        HttpResponse response = httpClient.execute(httpGet);
//        HttpEntity entity = response.getEntity();
//        return EntityUtils.toString(entity);
//    }
//
//    public static String sendPostRequest(String url, Map<String, String> params) throws IOException {
//        HttpPost httpPost = new HttpPost(url);
//        List<NameValuePair> parameters = new ArrayList<>();
//        for (Map.Entry<String, String> entry : params.entrySet()) {
//            parameters.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
//        }
//        httpPost.setEntity(new UrlEncodedFormEntity(parameters));
//        HttpResponse response = httpClient.execute(httpPost);
//        HttpEntity entity = response.getEntity();
//        return EntityUtils.toString(entity);
//    }
//}
